Raspberry Pi Picoをピコピコさせた
#Raspberry_Pi #RP2040 #RaspberryPiPico
Getting started with Raspberry Pi Pico
https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
Getting started with Raspberry Pi PicoのmacOSでのインストール方法を参考にしながら Raspberry Pi Pico をピコピコさせた。
https://gyazo.com/657445b91669d7518a97e79e8018a425
ツールチェインをインストール
Homebrewをインストール
$ brew install cmake
$ brew tap ArmMbed/homebrew-formulae
$ brew install arm-none-eabi-gcc
(M1 Macの場合は Rosetta 2 をインストール)
$ /usr/sbin/softwareupdate --install-rosetta --agree-to-license
SDKとexamplesを取得
$ cd ~/src
$ mkdir pico
$ cd pico
$ git clone https://github.com/raspberrypi/pico-sdk.git
$ cd pico-sdk/
$ git submodule update --init
$ cd ..
$ git clone https://github.com/raspberrypi/pico-examples.git --branch master
環境変数を設定
code:~/.zshrc
export PICO_SDK_PATH=$HOME/src/pico/pico-sdk
examplesをビルド
$ source ~/.zshrc
$ cd pico-examples/
$ mkdir build
$ cd build
$ cmake ..
$ cd blink
$ make
ビルドした実行ファイルをPicoへアップロード
Pico本体の BOOTSEL ボタンを押しながらMacへUSBケーブルを差し込んでUSB Mass Storage Modeにする
PicoがUSB Mass Storageデバイスとして認識されるので、ここにビルドした blink.uf2 をドラッグ&ドロップする
https://gyazo.com/08ac21c8d64049c9c9775a18db703cd1
Raspberry Pi Picoのuf2ってなんだ?
ピコピコするRaspberry Pi Pico
https://twitter.com/htkymtks/status/1501191725498662913
https://gyazo.com/cbbb4553a4215fd2a60f12c872180549
https://gyazo.com/657445b91669d7518a97e79e8018a425
参考
Getting started with Raspberry Pi Pico
https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
https://fukuno.jig.jp/3116